package edu.scsu.csci.validator;

import java.lang.annotation.Annotation;

import edu.scsu.csci.IValidator;
import edu.scsu.csci.annotation.validator.ANullValidator;
import edu.scsu.csci.controller.WebUtils;



final public class NullValidator implements IValidator<ANullValidator, Object>{

	public void validate(ANullValidator annotation, Object object) {
		if(object == null){
			WebUtils.setErrorMessage("the field value cannot be null");
		}
	}

	public boolean canValidate(Class<?> type, Class<? extends Annotation> annotaionType) {

		// TODO Auto-generated method stub
		return false;
	}
	
	
}
